package com.binhthuan.catechist.client.data;

import com.binhthuan.catechist.shared.constant.Parameter;
import com.binhthuan.catechist.shared.constant.Service;
import com.smartgwt.client.data.fields.DataSourceIntegerField;
import com.smartgwt.client.data.fields.DataSourceTextField;

public class PlanDS extends AbstractDS {

    private static PlanDS instance;

    private PlanDS() {
        super(Service.PLAN);

        DataSourceIntegerField id = new DataSourceIntegerField(Parameter.ID);
        id.setPrimaryKey(true);
        id.setHidden(true);

        DataSourceTextField name = new DataSourceTextField(Parameter.NAME);

        setFields(id, name);
    }

    public static PlanDS getInstance() {
        if (instance == null) {
            instance = new PlanDS();
        }
        return instance;
    }
}
